# -*- coding:utf-8 -*-
import xadmin

from .models import MenuType, Menu


class MenuTypeAdmin(object):
    list_display = ['name', 'number']
    search_fields = ['name', 'number']
    list_filter = ['name', 'number']


class MenuAdmin(object):
    list_display = ['name', 'user', 'menu_tpye', 'add_time']
    search_fields = ['name', 'user', 'menu_tpye']
    list_filter = ['name', 'user', 'menu_tpye', 'add_time']


xadmin.site.register(MenuType, MenuTypeAdmin)
xadmin.site.register(Menu, MenuAdmin)